home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / Button / Sources / Content.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  2.6 KB  |  97 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Content.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Author:                M.Boetcher
  7. //
  8. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef CONTENT_H
  13. #define CONTENT_H
  14.  
  15. // ----- FrameWork Includes -----
  16.  
  17. #ifndef FWCONTNT_H
  18. #include "FWContnt.h"
  19. #endif
  20.  
  21. #ifndef FWEXCLIB_H
  22. #include "FWExcLib.h"
  23. #endif
  24.  
  25. #ifndef FWRECEVR_H
  26. #include "FWRecevr.h"
  27. #endif
  28.  
  29. //========================================================================================
  30. //    Forward Declarations
  31. //========================================================================================
  32.  
  33. class CButtonPart;
  34. class CAction;
  35. class FW_CNotification;
  36.  
  37. //========================================================================================
  38. //    class CButtonContent
  39. //========================================================================================
  40.  
  41. class CButtonContent : public FW_CContent, public FW_MReceiver
  42. {
  43.   public:
  44.     FW_DECLARE_AUTO(CButtonContent)
  45.  
  46. //----------------------------------------------------------------------------------------
  47. //    Initialization/Destruction
  48. //
  49.   public:
  50.     CButtonContent(Environment* ev, CButtonPart* part);
  51.     virtual ~CButtonContent();
  52.  
  53. //----------------------------------------------------------------------------------------
  54. //    Inherited API
  55. //
  56.   public:
  57.     virtual void        ExternalizeKind(Environment* ev,
  58.                                     ODStorageUnit* storageUnit,
  59.                                     FW_CKind* kind,
  60.                                     FW_StorageKinds storageKind,
  61.                                     FW_CPromise* promise,
  62.                                     FW_CCloneInfo* cloneInfo);
  63.     virtual FW_Boolean    InternalizeKind(Environment* ev,
  64.                                     ODStorageUnit* storageUnit, 
  65.                                      FW_CKind* kind,
  66.                                     FW_StorageKinds storageKind,
  67.                                     FW_CCloneInfo* cloneInfo);
  68.  
  69.     virtual void        HandleNotification(Environment* ev, const FW_CNotification& notification);
  70.     
  71. //----------------------------------------------------------------------------------------
  72. //    New API
  73. //
  74.   public:
  75.       CAction*            GetAction();
  76.       void                ChangeAction(Environment* ev, CAction* action, short actionType);
  77.  
  78. //----------------------------------------------------------------------------------------
  79. //    Data Members
  80. //
  81.   private:
  82.     short                fActionType;
  83.     CAction*            fAction;
  84.     CButtonPart*        fPart;
  85. };
  86.  
  87. //----------------------------------------------------------------------------------------
  88. // CButtonContent::GetAction
  89. //----------------------------------------------------------------------------------------
  90.  
  91. inline CAction* CButtonContent::GetAction()
  92. {
  93.     return fAction;
  94. }
  95.  
  96. #endif
  97.